package com.drawingtimer.admin.enums;

import lombok.Data;

import lombok.Getter;

@Getter
public enum TProcessInfoEnum {

	NOT_STARTED(0, "未开工"), STARTED(1, "已开工"), PAUSED(2, "暂停"), COMPLETED(3, "已完工");

	private final int code;

	private final String desc;

	TProcessInfoEnum(int code, String desc) {
		this.code = code;
		this.desc = desc;
	}

	// 可选：通过code获取枚举
	public static TProcessInfoEnum getByCode(int code) {
		for (TProcessInfoEnum status : values()) {
			if (status.code == code) {
				return status;
			}
		}
		return null;
	}

}
